package cn.bonoon.kernel.support.services;

import java.util.List;

import cn.bonoon.kernel.menus.MenuableDefinition;
import cn.bonoon.kernel.menus.ModuleDefinition;
import cn.bonoon.kernel.menus.TabsDefinition;
import cn.bonoon.kernel.menus.privileges.PrivilegeInspector;
import cn.bonoon.kernel.support.IOperator;
import cn.bonoon.policy.PrivilegeStoragePolicy;

public interface PrivilegeSupport extends PrivilegeStoragePolicy{

	List<Long> getActions(MenuableDefinition item, IOperator user);

	/** 用户在这个菜单下的所有权限 */
	PrivilegeInspector privilege(IOperator user, MenuableDefinition item);

	PrivilegeInspector privilege(IOperator user, ModuleDefinition module);

	PrivilegeInspector privilege(IOperator user, TabsDefinition tab);

	PrivilegeInspector privilege(IOperator user, String mid, String cid);
}
